package rpc.exception;

import rpc.enums.RpcError;

/**
 * RPC调用异常
 *
 * @Author wupeijie
 * @Date 2020/11/20 10:05
 */
public class RpcException extends RuntimeException{
    public RpcException(RpcError error, String detail) {
        super(error.getMessage() + ":" + detail);
    }

    public RpcException(String message, Throwable cause) {
        super(message, cause);
    }

    public RpcException(RpcError error) {
        super(error.getMessage());
    }
}
